//
//  CharBuffRes.h
//  CandyJump
//
//  Created by Bon Lam on 02/07/2011.
//  Copyright 2011 Peru Republic. All rights reserved.
//

//=====================================================================================================================
@class CharacterBuffInfo;
@interface CharBuffRes : NSObject <NSXMLParserDelegate>
{
	NSMutableDictionary	*characterBuffInfoDict;
	
	//	Used for reading XML
	CharacterBuffInfo	*currentReadingObject;
}
//---------------------------------------------------------------------------------------------------------------------
@property (nonatomic, retain, readonly) NSMutableDictionary	*characterBuffInfoDict;
//---------------------------------------------------------------------------------------------------------------------
#pragma mark -
#pragma mark CharBuffRes - Singleton
- (id)init;
- (void)dealloc;
+ (id)allocWithZone:(NSZone *)zone;
- (id)copyWithZone:(NSZone *)zone;
- (id)retain;
- (NSUInteger)retainCount;
- (void)release;
- (id)autorelease;
+ (CharBuffRes *)sharedRes;

#pragma mark CharBuffRes - Load Data
- (void)loadCharBuff;

#pragma mark CharBuffRes - NSXMLParserDelegate
- (BOOL)parseXMLFile:(NSString *)filename;
- (void)parseXMLData:(NSData *)data parseError:(NSError **)error;
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict;
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName;
- (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError;
- (void)parserDidEndDocument:(NSXMLParser *)parser;

@end
